package cn.wawi.common.base;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import cn.wawi.utils.DateUtil;

public class MybatisMap<K, V> extends HashMap<K, V>{

	private static final long serialVersionUID = 1L;

	public  MybatisMap() {
		super();
	}
	public  MybatisMap(Map<K,V> m) {
		this.putAll(m);
	}
	@Override
	public V get(Object paramObject) {
		return super.get(paramObject);
	}

	@Override
	@SuppressWarnings("all")
	public V put(K paramK, V paramV) {
		if(paramV instanceof Date){
			paramV=(V) DateUtil.formatDate((Date)paramV, "yyyy-MM-dd hh:mm:ss");
			return super.put(paramK, paramV);
		}
		return super.put(paramK, paramV);
	}
	
}
